import 'package:flutter/material.dart';

class EmailIndex extends StatefulWidget {
  const EmailIndex({Key? key}) : super(key: key);

  @override
  State<EmailIndex> createState() => _EmailIndexState();
}

class _EmailIndexState extends State<EmailIndex> {

  List<Widget> PersionWidgetList=[];

  List PersionList=[];

  String ImageUrls="https://inews.gtimg.com/newsapp_bt/0/13950250923/1000";

  String StrMyUrl="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F202002%2F25%2F20200225055850_skqwb.thumb.1000_0.jpg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1676453515&t=98a5dbff6adfda533ff79393c1d4d71e";

  String StrYousUrl="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F202002%2F25%2F20200225055850_skqwb.thumb.1000_0.jpg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1676453515&t=98a5dbff6adfda533ff79393c1d4d71e";

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        //背景
        Image.network(
          ImageUrls,
          fit: BoxFit.cover,
          width: double.infinity,
        ),
        Positioned(
          height: 600,
          width: 392,
          child: SingleChildScrollView(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                MyItme(MyUrls: StrMyUrl,),
                YousItme(YousUrls: StrYousUrl,)
              ]
            ),
          ),
        ),
        Positioned(
          bottom: 0,
            child: Container(
              color: Colors.white,
              width: 400,
              height: 96,
            )
        ),
      ],
    );
  }
}

class MyItme extends StatelessWidget {
  final String MyUrls;
  const MyItme({Key? key,required this.MyUrls}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.all(6),
      width: double.infinity,
      // height: 100,
      child: Row(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Container(
            margin: EdgeInsets.all(10),
            height: 70,
            width: 70,
            decoration: BoxDecoration(
              borderRadius: BorderRadius.all(Radius.circular(90)),
              image: DecorationImage(
                image: NetworkImage(MyUrls)
              )
            ),
          ),
          Container(
            margin: EdgeInsets.fromLTRB(0, 14, 6, 6),
            color: Colors.pink,
            width: 280,
            child: Text(
                "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",style: TextStyle(
              fontSize: 36
            ),
            ),
          )
        ],
      ),
    );
  }
}

class YousItme extends StatelessWidget {
  final String YousUrls;
  const YousItme({Key? key,required this.YousUrls}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.all(6),
      width: double.infinity,
      // height: 100,
      child: Row(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Container(
            margin: EdgeInsets.fromLTRB(6, 14, 0, 6),
            color: Colors.pink,
            width: 280,
            child: Text(
              "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",style: TextStyle(
                fontSize: 36
            ),
            ),
          ),
          Container(
            margin: EdgeInsets.all(10),
            height: 70,
            width: 70,
            decoration: BoxDecoration(
                borderRadius: BorderRadius.all(Radius.circular(90)),
                image: DecorationImage(
                    image: NetworkImage(YousUrls)
                )
            ),
          ),
        ],
      ),
    );
  }
}


